config BR2_PACKAGE_ODROID_MALI
	bool "odroid-mali"
	depends on BR2_TOOLCHAIN_USES_GLIBC
	depends on BR2_aarch64 || BR2_ARM_EABIHF
	select BR2_PACKAGE_HAS_LIBEGL
	select BR2_PACKAGE_HAS_LIBGLES
	select BR2_PACKAGE_ODROID_SCRIPTS # runtime
	help
	  Install the ARM Mali drivers for odroidc2 based systems.

	  https://github.com/mdrjr/c2_mali

if BR2_PACKAGE_ODROID_MALI

config BR2_PACKAGE_PROVIDES_LIBEGL
	default "odroid-mali"

config BR2_PACKAGE_PROVIDES_LIBGLES
	default "odroid-mali"

endif

config BR2_PACKAGE_ODROID_MALI_X11
	bool
	depends on BR2_aarch64 # No 32 bit version available
	select BR2_PACKAGE_LIBDRM
	select BR2_PACKAGE_XLIB_LIBX11
	select BR2_PACKAGE_XLIB_LIBXDAMAGE
	select BR2_PACKAGE_XLIB_LIBXEXT
	select BR2_PACKAGE_XLIB_LIBXFIXES

comment "odroid-mali needs a glibc toolchain"
	depends on BR2_aarch64 || BR2_ARM_EABIHF
	depends on !BR2_TOOLCHAIN_USES_GLIBC
